/*
============================================================================
 Name        : pd_lui.cpp
 Author      : Jian(raphyer@hotmail.com)
 Version     :
 Copyright   : GPL
 Description : pd_lui.cpp - source file
============================================================================
*/

/* INCLUDE FILES */
#include "pd_lui.h"
#include "PdDefine.h"
#include "dd_utf8.h"

#include <eikenv.h>
#include <bautils.h>


int pd_create_and_set_log_folder(DD_UTF8* fileName, int maxLen) 
{
    dd_snprintf((DD_CHAR*)fileName, maxLen, "%s", "c:\\lui\\") ;
    
    DD_UNICODE* uniName = dd_utf8_to_unicode(fileName) ;
    
    if (BaflUtils::FolderExists(CEikonEnv::Static()->FsSession(), __ToPtrC16(uniName))) 
        return 0 ;

    TInt err = CEikonEnv::Static()->FsSession().MkDirAll(__ToPtrC16(uniName)) ;
    if (err != KErrNone)
        DD_LOG("_createFolder create the folder %s error = %d", fileName, err) ;
    DD_FREE(uniName) ;
    return err ;
}

/* End of File */
